-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PB-1212: Allow delete last point by button when on line editing mode. #1138
PB-1212: Allow delete last point by button when on line editing mode. #1138
Conversation
web-mapviewer Run #4035
Run Properties:
|
Project |
web-mapviewer
|
Branch Review |
pb-1212-allow-delete-last-point-on-editing-mode
|
Run status |
Passed #4035
|
Run duration | 04m 44s |
Commit |
17039868e4: PB-1212: handle delete last point on one place to avoid deleting point twice.
|
Committer | Ismail Sunni |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
21
|
Skipped |
0
|
Passing |
215
|
View all changes introduced in this branch ↗︎ |
const selectedEditableFeatures = computed(() => store.state.features.selectedEditableFeatures) | ||
const selectedLineString = computed(() => { | ||
if (selectedEditableFeatures.value && selectedEditableFeatures.value.length > 0) { | ||
const selectedFeature = selectedEditableFeatures.value[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can there be more than one feature selected while drawing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, no. But the store as a list of editable feature. Perhaps there is a way to do it or some historical reason?
I always select the first item. From the user point of view, it will be the same, since there will be always only one item in the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when finishing editing/adding more point to a line measure, the last point is sometimes automatically removed, there might be some call to the remove function where it shouldn't be
8f34164
to
1545f14
Compare
@pakb I have fixed the automatically removed, but I am not sure this is the same one as yours. Could you check it again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using "right click" works as expected, but using the "Delete last point" button not.
Could you make sure both are using the same logic? And maybe add some tests that uses this button alongside right click, so that we make sure it is working in both cases.
Side question : is it a big effort to make it possible to close the line as a polygon while adding points?
Underlying question is : can we gather the code that manages all "interactions" with a line/measure, and re-use them in both the "add new" and "edit" mode? It looks like the code isn't currently the same
74c86a2
to
a7009ca
Compare
hi @pakb
Fixed. Both are handled in one place, just different interaction to delete.
I think so, while there are some common features for both Draw Interactions, there are also some different, for example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, LGTM!
I created another ticket/task to fix the "close as a polygon" issue when adding more points
https://jira.swisstopo.ch/browse/PB-1275
…d vertex button overlay
a7009ca
to
1703986
Compare
Test link